import { ElMessage } from 'element-plus'

const success = (text) => {
    ElMessage({
        message: text,
        type: 'success',
        duration:1500,
    })
}
const warning = (text) => {
    ElMessage({
        message:  text,
        type: 'warning',
        duration:1500,
    })
}
const error = (text) => {
    ElMessage({
        message:  text,
        type: 'error',
        duration:1500,
    })
}

const loading = (text) => {
    return ElMessage({
        message:  text,
        type: 'info',
        duration:0,
    })
}

export const message = {
    success,
    warning,
    error,
    loading
}
